Method and apparatus for locating data regions in stored images of symbols

ABSTRACT

A method and apparatus locates a periphery or &#34;bounding box&#34; of an image of a symbol located within an image stored by a reader. The symbol preferably has a recognition pattern with an longitudinally extending bar and at least one vertically extending reference bar, such as in the Code One symbology. The method locates the positions of landmark points within the stored image. Landmark points include points at the end of the longitudinally extending bar, points at the corner or root formed between the longitudinally extending bar and the vertically extending bar, and points at the ends of the vertically extending bars. Based on the locations of the landmark points, lines are projected between pairs of the landmark points to determine an amount, if any, of optical distortion to which the image of the symbol suffers. Based on the landmark points, lines projected therebetween and the angles of any distortion, one or more bounding boxes are constructed to determine the periphery of the symbol within the stored image.

TECHNICAL FIELD

The present invention relates to determining the location of dataregions of a symbol in a stored image, and more particularly, to methodsand apparatus for identifying the areas of a two-dimensional matrixsymbol where data are encoded in a stored image for processing anddecoding by a symbology reader.

BACKGROUND OF THE INVENTION

Machine readable symbologies are widely used for data collection. Thefirst bar code symbologies developed, such as UPC, EAN, Code 39 and Code93 can be referred to as "linear" symbologies because the data in agiven symbol was decoded along one direction or axis. The nextgeneration of bar code symbologies, called stacked reader symbologies,such as Code 49 and PDF 417, increase the information density of thesymbol by employing several adjacent rows, each row having severalsymbol characters defined by groups of multiple width bars and spaces.

A recently developed symbology, Code One, is a two-dimensional matrixsymbology. As shown by a symbol 800 of FIG. 1, Code One symbols includea recognition pattern 802, a matrix of square data cells 804, ratherthan one or more rows of bars and spaces, vertical reference patterns806, which extend away from the recognition pattern 802. The areas ofsquare data cells 804 above the recognition pattern 802, and below therecognition pattern 802, respectively, are defined by an upper boundingbox 808 and a lower bounding box 809. The recognition pattern 802 runshorizontally through the Code One symbol 800, while the verticalreference patterns 806 extend perpendicularly from the recognitionpattern 802. These vertical recognition patterns 806 are used to helpfind the symbology, and determine the symbology's tilt and orientationto take into account any surface curvature of the symbol 800.

Each of the data cells 804 in the matrix encodes one bit of data: awhite data cell represents a 0 and a black data cell represents a 1.Each symbol character in the Code One symbology is generally constructedfrom eight data cells in a rectangular array of two rows that each havefour data cells. Each set of eight data cells in a Code One symbolcharacter encodes an 8-bit byte of binary data. The ASCII values in theCode One symbology are equal to the standard ASCII values in thecomputer industry plus one.

In a given Code One symbol, the symbol characters are ordered in arow-wise fashion from left to right, and the "rows" of symbol charactersare arranged from top to bottom in the symbol. Each row of symbolcharacters in a Code One symbol consists of a pair of adjacent rows ofdata cells. The first symbol character in the Code One symbol is in thetop left corner of the symbol and the last symbol character is in thebottom right corner. A reader analyzes the symbol characters in a CodeOne symbol from the first symbol character in the symbol's top leftcorner rightward to the right edge of the top row, and then from theleft edge rightward along the second row, and so forth. Assuming thereader encounters no difficulties, each symbol character analyzed in aCode One or other symbology is converted into corresponding data to beused by the reader, the user, or other peripheral equipment.

The recognition pattern 802 is comprised of a plurality of elementsincluding bars 810 and spaces 812. The recognition pattern 802 is usedto identify the version (i.e., the type) of Code One symbol being used.Further, the recognition pattern 802 is used to determine theX-dimension of the Code One symbol 800. For example, the X-dimensionrepresents the smallest height (or width) of the data cells 804 in theCode One symbology. The X-dimension is used to determine the intendeddimension that an area symbology is based on, regardless of printingerrors, and is necessary for decoding the symbology.

The reader used to scan the Code One symbol 800 is a two-dimensionalimaging device which detects all the spaces 810 and the bars 812 of therecognition pattern 802, as well as the vertical reference patterns 806using a fast linear image search routine used in high-speed scanningapplications. A memory stores the scanned image and includes an array ofmemory locations that correspond to and represent a pixel field of viewof the reader (e.g., a rectangular array of 582 by 752 pixels). Thestored image is referenced by a Cartesian coordinate system relative tothe imaging device or memory so that the location of each pixel isrepresented by a pair of numbers indicating the horizontal and verticalposition of the pixel in the stored image. For example, the first pixelin the top left corner of the stored image is assigned the Cartesiancoordinates (0,0) while the bottom right-most pixel is assigned thecoordinates (752,582). Therefore, data cells 804 associated with groupsof pixels can be arithmetically located using known geometric andtrigonometric properties based on the coordinate system.

In the prior art, as shown in FIG. 2, to determine the location of allthe data cells 804 within the stored image, the image search routine wasused to locate a long bar 814 of the recognition pattern 802, then theX-dimension was determined from the recognition pattern 802. Next, anangle 816 that the long bar 814 makes with the X axis of the Cartesiancoordinate system of the overall image was determined. Finally, usingthe above X-dimension and angle 816, a bounding box 807 of the symbol800 defined by the boundary lines of the symbol 800 was determined.

The prior method computes one bounding box 807 for the Code One symbol800 enclosing the entire symbol 800. The boundary box 807 is the sum ofupper bounding box 808, lower bounding box 809 and the center patternrecognition 802. To determine the size and location of the bounding box807, an end point 818 of the long bar 814, i.e., ep₁, was located and apath 820, substantially along the Y-axis of the Cartesian coordinatesystem, i.e., directed away from the recognition pattern 802, wastraversed for a predetermined number of the X-dimensions. The directionof the path 820 was determined by the angle that is vertical to the longbar 814 (i.e., the angle 816) to establish an end corner point cp₁ 824of the bounding box 807. The other corner point 828, i.e., cp₂, of thebounding box 807, and the other corner points 842 and 844, i.e., cp₃ andcp₄, of the bounding box 807 were determined in a similar manner. Withthese corner points, the complete bounding box 807 was defined, and allsquare data cells 804 were assumed to lie within this region forpurposes of information retrieval from the image when the size of theX-dimension and the version of the symbol were known.

Although the prior art method of determining the bounding box 807 of theCode One symbol is effective when the symbol 800 is in its properposition, and has no significant surface curvature, it becomes highlyprone to errors when the symbology 800 is optically distorted, e.g.,when an image of the symbol is stored when a reader is significantlytilted with respect to the symbol. In other words, when the upper andlower bounding boxes 808 and 809 do not have the same size and shape,and the X-dimension varies within the symbol, data can be lost duringthe decoding process.

For example, as shown by an optically distorted symbol 800' in FIG. 3,even a slight deviation between the angle the long bar 814 makes with anX axis of the Cartesian coordinate system causes the computed boundingbox 807 defined by the dashed boundaries with four corners cp1, cp2,cp3, and cp4 to differ from the true bounding box for the symbol (shownas the solid line quadrilateral 830). Additionally, optical distortionscausing the stored image of the symbol to appear trapezoidal orotherwise optically distorted, as shown in FIG. 3, causes the perimeterof the stored image of the symbol 830 to differ significantly from thebounding box 807 computed by the prior art method. As a result,information retrieval errors will result by sampling within the computedbounding box 807. Important data within the true bounding box 830 can beignored, such as the information located in shaded areas 837 of FIG. 3.This is because when following an angle that has a slight error, theresulting positional error can be huge if the distance along the path islarge enough. In other words, the error will accumulate to a significantdegree using the prior art method, even if only a small amount of erroris present in the direction of the path. Similarly, when there is aslight error in X-dimension, the total error will be larger if thedistance is large enough. Thus, what is needed is a method ofdetermining the bounding box that localized the data region and is freefrom error, and which will ensure that all the square data cells 804fall within the true bounding box.

SUMMARY OF THE INVENTION

A method and apparatus locates a periphery or "bounding box" of two dataareas in an image of a symbol located within an image stored by areader. The symbol preferably has a recognition pattern with alongitudinally extending bar and at least one vertically extendingreference bar, such as in the Code One symbology. The method locates thepositions of landmark points within the stored image. Landmark pointsinclude points at the end of the longitudinally extending bar, points atthe corner or root formed between the longitudinally extending bar andthe vertically extending bar, and points at the ends of the verticallyextending bars. Based on the locations of the landmark points, lines areprojected between pairs of the landmark points to determine an amount,if any, of optical distortion to which the image of the symbol suffers.Based on the landmark points, lines projected therebetween and theangles of any distortion, two bounding boxes, one above the centerrecognition pattern and one below it, are constructed to determine theperiphery of the symbol within the stored image.

In a broad sense, the present invention embodies a method for computinga location of data regions enclosed by the corresponding bounding boxesin a stored image of a symbol. The symbol includes a recognition patternhaving an outermost bar and at least one vertical reference patternextending perpendicularly from the recognition pattern. For upperbounding boxes, the method includes the steps of: (i) locating aposition of a first end point and a second end point of the outermostbar of the recognition pattern; (ii) locating a position of an outermostpoint of each of the at least one vertical reference pattern; (iii)determining a position of a first corner point and a second corner pointfor the symbol by extending at least one line from the outermost point apredetermined distance in a predetermined direction; and (iv) defining aperiphery of the upper data region of the symbol using the positions ofthe first end point, the second end point, the first corner point, andthe second corner point.

For locating a lower bounding box, the method includes the steps of: (i)locating a position of a first end point and a second end point of abottom-most bar of the recognition pattern, extending the end points bya predetermined number of X-dimensions to find the top two corner pointsof the lower boundary box; (ii) locating a position of an outermostpoint of each of the at least one vertical reference pattern; (iii)determining a position of a third corner point and a fourth corner pointfor the symbol by extending at least one line from the outermost point apredetermined distance in a predetermined direction; and (iv) defining aperiphery of the lower data region of the symbol by the first, second,third and fourth corner points.

The present invention also embodies an apparatus for decoding amachine-readable symbol that represents encoded information. The symbolhas a recognition pattern with an outermost bar and at least onevertical reference pattern extending approximately perpendicular fromthe recognition pattern. The apparatus includes a sensor that receiveslight reflected from the symbol. The sensor produces an output signaltherefrom.

A receiver receives the output signal and produces a data signalindicative of the encoded information, the recognition pattern and atleast one vertical reference pattern. A processor for decoding theencoded information encoded in the symbol is programmed to (a) locate aposition of a first end point and a second end point of the outermostbar of the recognition pattern, (b) locate a position of an outermostpoint of each of the at least one vertical reference pattern, (c)determine a position of a first corner point and a second corner pointfor this symbol by extending at least one line from the outermost pointa predetermined distance in a predetermined direction, (d) define aperiphery of an upper data region of the symbol using the positions ofthe first end point, the second end point, the first corner point andthe second corner point, and (e) decode the encoded information withinthe periphery of the symbol. The processor is also programmed tosimilarly determine the periphery of a lower data region of the symbol.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a Version E Code One symbol.

FIG. 2 is a schematic diagram of a Code One recognition pattern thatshows an example of a conventional method for determining a bounding boxof a Code One symbol.

FIG. 3 is a schematic diagram of an optically distorted image of aversion E Code One symbol as stored by an imaging device that ismisaligned and tilted with respect to the symbol.

FIG. 4 shows a block diagram of a symbology reader of the presentinvention.

FIG. 5A is a schematic diagram of a Code One recognition pattern thatshows, in a first embodiment, a method of accurately determining thebounding box of a Code One symbol.

FIG. 5B is a schematic diagram that shows an example of determining afirst corner point cp₁ for a top bounding box of the symbol of FIG. 5A.

FIG. 5C is a schematic diagram that shows an example of determining asecond corner point cp₂ of a top bounding box of the symbol of FIG. 5A.

FIG. 5D is a schematic diagram that shows an example of determining athird corner point cp₄ for a lower bounding box of the symbol of FIG.5A.

FIG. 5E is a schematic diagram that shows an example of determining afourth corner point cp₃ for a lower bounding box of the symbol of FIG.5A.

FIG. 6A is a flowchart which shows a main program implementing the firstembodiment of a method used to determine the bounding box of asymbology.

FIG. 6B is a flowchart of a subroutine in the first embodiment, invokedto determine a first corner point cp₁ of a top bounding box of thesymbology.

FIG. 6C is a flowchart of a subroutine in the first embodiment invokedto determine a second corner point cp₂ of the top bounding box of thesymbology.

FIG. 6D is a flowchart of a subroutine in the first embodiment invokedto determine a first corner point cp₃ of a bottom bounding box of thesymbology.

FIG. 6E is a flowchart of a subroutine in the first embodiment invokedto determine a second corner point cp₄ of the bottom bounding box of thesymbology.

FIG. 6F is a flowchart of a subroutine in the first embodiment used todetermine when a bar within either the first or second bounding box hasbeen traversed.

FIG. 6G is a flowchart of a subroutine in the first embodiment used todetermine when a bar associated with the first or second bounding boxhas been traversed.

FIG. 7A shows a recognition pattern and the vertical reference patternsof version A and version B Code One symbols.

FIG. 7B shows, in a second embodiment, an example of a method fordetermining the corner points of a top and bottom bounding box of theversion A and version B Code One symbols.

FIG. 8A is a flowchart which shows a main program implementing a methodof determining the dimensions of the bounding boxes of the version A andversion B symbols, in the second embodiment.

FIG. 8B is a flowchart of a subroutine in the second embodiment invokedto compute corner points of the bounding boxes of the symbology.

DETAILED DESCRIPTION OF THE INVENTION

As shown in FIG. 4, a data collection symbology reader 20 of the presentinvention includes a light source 22 that illuminates a data collectionsymbol, such as Code One symbol 24 having a recognition pattern 26 andvertical reference patterns 28, as well as square data cells 30. As usedherein, a data collection symbol refers to a symbol from any linear,stacked, area or other machine-readable symbology. A sensor 32 in thereader 20 receives the light reflected from the symbol 24 and convertsthe received light into an electrical signal. The light source 22 ispreferably a flashbulb, infrared light source, one or more LEDs or otherlight-emitting elements, while the sensor 32 is preferably acharge-coupled device ("CCD"), two-dimensional semi-conductor array,vidicon, or other area imager capable of converting received light intoelectrical signals.

A receiver or converter 34 receives the electrical signals from thesensor 32 and converts it into a signal to be processed by a programmedcomputer or processor 36. Typically, the sensor 32 produces an analogsignal that represents the modulated light reflected from the elementsin the symbol 24. If the processor 20 is a digital computer, then theconverter 34 converts the analog signal into a digital signal to beprocessed by the processor 36. The converter 34 and/or processor 36preferably include a memory for storing the digital signal. As describedmore fully below, the processor 36 of the reader 20 performs a routinestored in memory that provides an accurate estimate of the boundingboxes 38 of the symbol 24 regardless of whether the symbol 24 is tiltedwith respect to the reader 20. The routine accomplishes this by findingpositions on the vertical reference bars 28 as well as bars 50 and 107in the recognition pattern 26 and uses them to determine corner pointsof the bounding boxes. By traveling from the positions on the verticalreference bars 28, the path traveled to reach the corner points isreduced (i.e., the number of X-dimensions traveled is reduced) and thisminimizes any deviation caused by a small error in the X-dimension or inthe angle of the recognition pattern 26 with respect to a Cartesiancoordinate system used for retrieval of information in the image storedby the reader 20.

The sensor 32 preferably includes a rectangular array of photosensitiveelements such as CCDs. Each CCD element in the rectangular arraypreferably outputs a gray level signal ranging from 1-15, i.e., ananalog signal that determines the amount of intensity of light impingingupon a particular pixel element. Alternatively, each pixel element inthe array of the sensor 32 can output a binary signal indicating thatthe particular pixel element is either black or white. After the signalsfrom the sensor 32 are approximately converted by the converter 34, theprocessor 36 stores the signals produced by the sensor in an imagewithin a field of view of the sensor 32. As a result, the processor 36may repeatedly analyze and manipulate the stored signals.

The reader 20 can be a hand-held product and can include a triggerswitch 40 coupled to the processor 36. By actuating the trigger switch40, the processor 36 causes the light source 22 to provide light to thesymbol 24 that is reflected therefrom to the sensor 32. Since theprocessor 36 stores the signals that are output from the sensor 32 andconverted by the converter 34, a user, by actuating the trigger switch40, can cause the reader 20 to store an instantaneous image within thefield of view of the reader 20, creating a snapshot of the symbol 24.The specific means and method for storing and locating an image of thesymbol 24 are well known and will be understood by those in the relevantart without further need for description herein.

The routine stored in the memory of processor 36 uses the instantaneousimage stored in the reader 20 to determine the bounding boxes of a datacollection symbology, such as a Code One symbol 24 as shown in FIG. 5A,by locating its recognition pattern 26. Then, as shown in FIG. 5A, todefine a top bounding box 60, a top long bar 50 of the recognitionpattern 26 is located and each of its upper end points ep₁ (52) and ep₂(54) are determined by methods well known in the art.

Once the end points ep₁ (52) and ep₂ (54) have been determined, the root56 (i.e., base) of the vertical reference patterns 28 that arecontiguous with the top long bar 50 are found by beginning the start ofa searching process, at a point A(58) which is a number Z ofX-dimensions in a direction σ, the direction σ being defined as thedirection along a top edge of the top long bar 50. For a version A or BCode One symbol, the preferred value of Z is 3.5, while for theremaining versions of Code One symbols, Z is preferably 5.5.

From the starting point A(58), a search, as is well known in the art,continues along the direction σ until the processor 36 encounters asharp edge angle change. The edge angle is the gradient direction angleat the edge point. The gradient direction angle refers to the distanceof greatest change in pixel intensity from a given pixel with respect tothe edge direction at that pixel or point. In the present invention, thegradient direction angle at a given point is generally perpendicular tothe edge of a bar or other feature in the symbol at that point. Theangle change is then tested by the processor 36 to determine if the areacausing the abrupt change has a width less than 50% of the X-dimension,if it does, then the search continues since the change would most likelybe an aberration or distortion and not the root of the verticalreference pattern 28. Once the 50% is exceeded and the root 56 has beenlocated, the direction of travel σ is changed to a direction σ', alongan inner edge 61 of the upper right most vertical reference pattern 28.In general, as shown in the figures herein, incremental "travelling"refers generally to sampling pixel after pixel in the stored image, areshown as small hash marks, such as the marks along an outer edge of longbar 50, vertical reference bars 28, etc., in the symbol.

Thereafter, the processor 36 samples the vertical reference pattern foran inner corner (62) beginning at a point B(64). Point B(64) is M'number of X-dimensions from root 56, where the value of M' variesdepending on the version of the Code One symbol. Then, starting from thepoint B(64), an incremental search along the new direction σ' iscontinued until the processor 36 encounters a sharp angle indicatingthat it has reached the inner corner r₁ (62). Once the inner corner 62is located, a path across a bar forming a foot 66 of the verticalreference pattern 28 is traversed until a top point R₁ (68) has beendetermined.

Thereafter, a similar process is performed to locate root C₂ (72) of aleft most upper vertical reference bar 28, after locating end point ep₂(54). Inner corner point r₂ (76) and top point R₂ (78) are found in amanner similar to that used to determine r₁ (62) and R₁ (68).

To locate reference points used to determine the lower bounding box 70,the roots C₁ (56) and C₂ (72) of the vertical reference patterns 28 inthe upper bounding box 60 are used. Initially, roots C₃ (80) and C₄ (82)of respective right and left vertical reference patterns 28 of the lowerbounding box 70 are found by moving from the root C₁ (56) to the root C₃(80) and from the root C₂ (72) to the root C₄ (82) via a direction σ",which is in the opposite direction of σ'. The path along the directionσ" initially traverses the recognition pattern 26 a distance of ZX-dimensions downward. The value of Z is determined based on the numberof bars and spaces, each having a width of an X-dimension, within theversion of the Code One symbol being decoded. Alternatively, afterlocating the root C₃ (80), the root C₄ (82) can be found by traversingin the direction σ. Alternatively, the root C₃ (80) and C₄ (82) can befound by traversing from end points d₁ and d₂, respectively, apredetermined number of X-dimensions in an outward direction from thesymbol along the lowest bar of recognition pattern and then traversingone X-dimension vertically down across the bar 107.

Once the roots C₃ (80) and C₄ (82) have been determined, the processor36 begins sampling at points D(84) and E(86), respectively, which are anN number of X-dimensions from the roots along a path continuing in thedirection σ". Then an incremental search is made until a sharp angle isencountered indicating that inner corners r₃ (88) and r₄ (90) have beenreached. Once the inner corners r₃ (88) and r₄ (90) have been located,the processor 36 continues the path along direction σ" across a foot 92and a foot 94, respectively, to determine bottom points R₃ (96) and R₄(98).

Once all reference points have been determined, the next step is todetermine the angular distortion of each bounding box. First, as shownin FIG. 5B, the processor 36 determines an angle Θ₁ between the lineconnecting end point ep₁ (52) and end point ep₂ (54) with respect to theCartesian coordinates of the image information retrieval system. Then anangle Θ₂ of a line connecting top points R₁ (68) and R₂ (78) withrespect to the Cartesian coordinate system is determined. Finally, anangle of distortion Θ is calculated using the equation: Θ=Θ₂ -Θ₁.

The corner point (cp₁)100 is determined by continuing along the path ofa line R₂ R₁ for some length T. The length T is calculated as follows:##EQU1## where L₁, L₂, L₃ are lengths of lines c₂ c₁ , c₁ ep₁ , and R₂R₁ . The angles α, β, α', β' are as shown in FIG. 5B.

Corner point cp₂ (102) is calculated in a similar manner, as shown inFIG. 5C. The corner point cp₂ (102) is determined by continuing alongthe path of line R₁ R₂ for some length T'. The length T' is calculatedas follows: ##EQU2## where L'₁, L'₂, L'₃ are the lengths of lines c₂ c₁, ep₂ c₂ , and R₂ R₁ , and angles α", β", α'"β'" are as shown in FIG.5C.

Thus, the upper bounding box 60 is defined by the boundary that connectsend point ep₁ (52) to corner point cp₁ (100) and corner point cp₁ (100)to corner point cp₂ (102) and corner point cp₂ (102) to end point ep₂(54) and end point ep₂ (54) to end point ep₁ (52).

Referring to FIGS. 5D and 5E, a lower bounding box 70 can be defined byboundaries connecting end points ep'₂ (104) and ep'₁ (106) with cornerpoints cp₃ (108) and cp₄ (110). Initially, a lowest short bar 107 of therecognition pattern 26 and both of its end points ep₃ (110) and ep₄(112) are located by methods well known in the art. Point ep'₂ (104) isdetermined by continuing along a line ep₃ ep₄ some predetermined amountof X-dimension that are characteristic of the number of data cellstypically extending beyond that portion of the short bar 108 for thechosen version of the symbology. Corner points cp₃ (108) and cp₄ (110)are found in a manner identical to corner point cp₁ and corner point cp₂by continuing along lines R₄ R₃ and R₃ R₄ , all respectively.

In this manner all the data cells within the symbology can be retrievedand the projected path distances used to determine the corner points areminimized thus minimizing deviations due to small errors in either thecalculation of the X-dimension or the angle of the symbology.

A method similar to that described above can be used to define boundingboxes of version A and B of symbologies that have only one verticalreference bar in each of a lower and upper bounding box, as will bedescribed in more detail below with respect to a second embodiment ofthe present invention.

In a first embodiment, the processor 36 is controlled by software thatis stored as a series of program instructions in the memory of theprocessor 36 to perform the above-described process for acquiring thebounding boxes of the symbol 24. Flowcharts from which a source code canbe written by one skilled in the art are illustrated in FIGS. 6A-6G.

Referring to FIG. 6A, a main routine 200, which is executed by processor36, begins in step 201 by inputting to the processor 36 an X-dimensionof the symbol 24. The X-dimension is preferably computed under theinventor's application Ser. No. 08/524,368, filed Sep. 6, 1995, entitledOrientation Independent Method For Robust Computation Of X-dimensions,incorporated herein by reference. Additionally, in step 201, the versionof the symbol 24, end points ep₁ (52), ep₂ (54), ep₃ (110), and ep₄(112), are independently input by an operator or automaticallydetermined by analyzing the recognition pattern 26 by methods well knownin the art.

In step 202, the processor 36 follows a top of the long bar 50 until itdetermines the locations of the roots C₁ (56) and C₂ (72). The processor36 determines the locations by invoking a corner finding subroutine 450,as shown in FIG. 6F.

Referring to FIG. 6F, initially in step 452 of subroutine 450, theprocessor 36 inputs the X-dimension of the symbol 24, which has beenpreviously determined. The processor 36 in step 452 also inputs aninitial direction of sampling σ which is dependent on which corner point(root) is being sought. Initially, the direction σ to determine cornerpoint C₁ (56) will be input. Next, in step 454, the processor 36initializes a value k to 1 (k=1), where k represents the number ofsamples the processor 36 has made along the direction σ. In step 456,the processor 36 seeks an edge point at some point (x, y) or itsneighborhood, preferably a 3×3 pixel neighborhood, in the Cartesiancoordinate system, as is well known in the art and described in A.Rosenfeld, Digital Picture Processing, Academic Press, Volume 1 andVolume 2, 1982, incorporated by reference herein.

In step 458 the processor 36 determines if there is an edge within anyof the 3×3 area checked, if not, then the processor 36 returns to themain routine 200 and indicates on a user display (not shown) that afailure has occurred. However, if the processor 36 found that an edgedoes exist, then it proceeds to step 460. In step 460 the processor 36checks whether an edge exists at a next point (x₁, y₁) out of the pointsin the 3×3 pixel area surrounding (x,y) that are stored in memory, andtests this point against conditions:

    1≦dist |(x.sub.1, y.sub.1), (x,y)|≦3; and

    |∠(x,y)(x.sub.1, y.sub.1)-σ<π/2

As used generally herein, the symbol ∠(X,Y)(X₁,Y₁) refers to the anglethat a line (X,Y)(X₁, Y₁) (formed by points (X,Y) and X₁, Y₁) makes withrespect to the X axis of the Cartesian coordinate system employed by thepresent invention. Additionally, "dist" refers to determining thedistance between two points using the well-known distance formularecited below. If the edge of (x₁, y₁) is between 1 and 3 pixels away,and the edge is not at a point less than 90° from the direction oftravel σ, then the processor 36 proceeds to step 462.

In step 462, the processor updates the direction σ by a linking historyof N previous points, where σ=the average of {σ_(k-1), σ_(k-2), σ_(k-N)}. Then, the processor 36, in step 464, increments k to k+1 and setssampled point (x, y) to value (x₁, y₁) and returns to step 460. However,if the conditions of step 460 are not met, then the processor 36proceeds to step 466.

In step 466, the processor 36 takes sample readings at all (x_(i),y_(i)), where i=1, . . . M, and where each I(x_(i), y_(i)) satisfies thecondition:

    1≦dist|(x.sub.i, y.sub.i)(x.sub.1, y.sub.1)|<X-dimension/2 and |∠(x,y)(x.sub.1, y.sub.1)-σ|<π/4,

and stores them in its memory. As a result, the processor 36 detects andstores an intensity between 1 and less than one half an X-dimensiondistance that is not at a 45° or more angle from direction σ. Then, instep 468 the processor 36 compares all values I(x_(i), y_(i)) with athreshold intensity value I_(threshold), and if all the intensitiesI(x_(i), y_(i)) are less than the I_(threshold), then the processor 36determines that a corner was reached and was not caused by an anomaly,but by a vertical reference bar 28. Thereafter, the processor 36 returnsto the main program 200 in step 470 and displays corners coordinates(x_(k), y_(k)).

If all the measured intensities I(x_(i), y_(i)) are not less than theI_(threshold), then the processor 36 proceeds to step 472. In step 472,the processor 36 compares all the measured intensities I(x_(i), y_(i))with the threshold intensity I_(threshold), and if all the intensitiesI(x_(i), y_(i)) exceed the threshold, then the processor 36 proceeds tostep 474, returns to the main routine 200 and indicates on a display(not shown) that no corner was found. This display communicates to auser that the processor 36 is no longer taking samples along the bar itwas traveling along, but is now sampling in a space or has left therecognition pattern 26. However, if at least some of the measuredintensities I(x_(i), y_(i)) are less than or equal to the thresholdintensity I_(threshold), then the processor 36 proceeds to step 476.

In step 476 the processor 36 jumps one-half an X-dimension, by changingthe value of x to x=x+1/2X_(dim) cosσ and the value of y toy=y+1/2X_(dim) sinσ, then the processor 36 returns to step 456 and findsa new edge point. This allows the processor 36 to expand the scope ofits search for the next edge point. The corner finding subroutine 450continues until the processor 36 registers a success in finding thecorner point C₁ (56) or a failure is registered. Then, a new directionfor locating C₂ (72) is input into the processor 36 and the subroutine450 is repeated as described above until the corner point C₂ (72) isalso located, or a failure is registered. Finally, the processor 36returns to the main routine 200.

The processor 36 once returning to the main routine 200 in FIG. 6A,after determining both corner points (roots) C₁ (56) and C₂ (72), thenproceeds to step 204. In step 204 the processor 36 sequentially inputsthe direction of travel σ' (perpendicular to σ) and the corner points C₁(56) and C₂ (72) and then follows the direction σ', along verticalreference bar 28 from C₁ (56) and C₂ (72) to inner corner points r₁ (62)and r₂ (76), respectively, by invoking the corner finding subroutine450, which operates as described above. Once the processor 36, usingsubroutine 450, has determined the location of inner corner points r₁(62) and r₂ (76), it then returns to the main routine 200 and proceedsto step 206. In step 206 the processor 36 computes the angle Θ₁ bydetermining the angle that the path between the root C₁ (56) and theinner corner r₁ (62) makes with the Cartesian coordinate system used forretrieval of information, i.e., Θ₁ =∠C₁ r₁ . The processor 36 in step206 also calculates Θ₂, which is the angle the path between the root C₂(72) and the inner corner r₂ (76) makes with the Cartesian coordinatesystem, i.e., Θ₂ =∠C₂ r₂ .

Once the processor 36 has located the inner corners r₁ (62) and r₂ (76),as well as their respective direction of travel, i.e., angles Θ₁ and Θ₂,with respect to the Cartesian coordinate system, it then proceeds todetermine top points R₁ (68) and R₂ (78) in step 208 by invoking a barcrossing subroutine 500, shown in FIG. 6G.

Referring to FIG. 6G, in step 502 of the bar crossing subroutine 500,the processor 36 initializes a value k, which represents the number ofsamplings, i.e., the processor sets k=1. The subroutine 500 must beinvoked twice by step 208 to find R₁ (68) and R₂ (78). When, forexample, top point R₁ (68) is being determined, the processor 36 in step504 recalls the direction σ and the X-dimension of the symbol 24 frommemory, as well as the starting point, which is the corner r₁ (62).Next, in step 506, the processor 36 takes an intensity reading I_(k) (x,y), and in step 508, the processor 36 compares I_(k) (x, y) with athreshold intensity value I_(threshold). If the stored intensity readingI_(k) (x, y) does not exceed the threshold intensity level, then theprocessor 36 determines that the bar has not yet been crossed andproceeds to step 510.

In step 510 the processor 36 establishes new x and y coordinates asx_(new) =x+cosσ and y_(new) =y+sinσ. Then, in step 512, the processor 36sets the value x=x_(new) and the value y=y_(new) and increments k by oneand moves to the new sampling point I_(k) (x,y).

However, if in step 508 the processor 36 determines that the intensityreading I_(k) (x, y) exceeds the threshold, and that there is apossibility that the bar has been crossed, then the processor 36proceeds to step 514. In step 514 the processor 36 checks intensitylevels at two previous points and at two points following the monitoredintensity I_(k) (x, y), and compares these values to a thresholdintensity as follows:

    1/2|(I.sub.k-1 +I.sub.k-2)-(I.sub.k+1 I.sub.k+2)|>0.5·I.sub.threshold.

This extra step assists in determining if the bar has actually beencrossed, or if some anomaly has been encountered. If the difference inintensities before and after the monitored point does not exceed theintensity threshold, then the monitored point is merely an anomaly dueto reflection, damage to the symbol 24, etc. The processor 36 thencalculates x_(new) and y_(new) as well as increments the value of k instep 512, as described above, and returns to step 506 in the subroutine.

However, if the difference in intensities is greater than the threshold,then it is likely that the foot 66 (i.e., the part of the reference bar28 being traveled through in FIG. 5A) has been crossed. Thus, theprocessor 36 proceeds to step 516 to determine the distance of the pointof crossing from the initially scanned point by using the equation:##EQU3## Finally, the processor 36 proceeds to step 518, where itcompares the calculated distance (dist) with the X-dimension of thesymbol. If the distance is either less than 50% of the X-dimension ormore than 150% of the X-dimension, then the processor 36 determines thatthe calculated size of the foot 66 is too small or large to be correct,and it proceeds to step 520 where it returns to the main routine 200,and causes a display (not shown) to indicate that the attempt to locatethe top point R₁ (66) has failed. If, however, the distance fallsbetween 50% and 150% of the X-dimension, then the processor 36 proceedsto step 522 and returns to the main routine 200, where it storessuccessful (x_(k), y_(k)) coordinates for the position of the top pointR₁ (68).

The procedure that the bar crossing subroutine 500 uses to determine theposition of top point R₂ (78) is identical to that used to determine R₁(68) except in step 504, the direction Θ₂ is input, and the startingpoint for sampling begins at corner point r₂ (76).

After the processor 36 has determined the values of R₁ (66) and R₂ (78),it returns to main routine 200, as shown in FIG. 6A, and proceeds tostep 210. In step 210, the processor 36 starting at roots C₁ (56) and C₂(72) proceeds to travel along a direction 180° from Θ₁ and Θ₂ by apredetermined number of X-dimensions. The processor then searches thesmall area around the newly obtained point for an edge point. When theedge point is found, the processor invokes the corner finding subroutine450 to find the location of lower roots C₃ (80) and C₄ (82),respectively. Since the processor 36 knows the version of the symbol 24,the processor knows how many bars must be crossed in the finder pattern26 before locating the lower roots C₃ (80) and C₄ (82).

Then, in step 212, the processor 36 follows an edge of verticalreference patterns 28 from the lower roots C₃ (80) and C₄ (82) to lowerinner corner points r₃ and r₄, respectively, by invoking the cornerfinding subroutine 450 (discussed above), as shown in FIG. 6F. In step214, the processor 36, crosses the width of feet 92 and 94 from innercorners r₃ (88) and r₄ (90) to bottom points R₃ (96) and R₄ (98) byinvoking the bar crossing subroutine 500 (described above), shown inFIG. 6G. Once the processor 36 has determined top points R₁ (68), R₂(78), and bottom points R₃ (96) and R₄ (98), it proceeds to step 216,and invokes a first corner point subroutine 250, shown in FIG. 6B.

Referring to FIG. 6B, the processor 36 under the corner point subroutine250 begins in step 252 and recalls and inputs the previously calculatedvalues C₁ (56), C₂ (72), R₁ (68), R₂ (78), ep₁ (52), and ep₂ (54). Then,in step 254, the processor 36 determines a length L₁, as shown in FIG.5B, by measuring the distance between the root C₁ (56) and the root C₂(72). In step 254 the processor 36 also determines a length L₂ bymeasuring the distance between the root C₁ (56) and the end point ep₁(52). Further, the processor 36 determines a length L₃, also shown inFIG. 5B, by measuring the distance between the top point R₂ (78) and thetop point R₁ (68). The lengths L₁, L₂, and L₃ are determined by usingthe well-known distance formula recited above. The processor 36 thenstores these lengths in its memory, and proceeds to step 256.

In step 256, the processor 36 calculates the angle Θ, which is thedistortion of angular difference between a line connecting the endpoints of top long bar 50 of the symbol 24 and the line connecting thetop points of the symbol. In a non-distorted symbol these lines would beparallel, but any existing angular difference between the lines must becompensated. Initially, in step 256, the processor 36 determines theangle Θ₁, that a line connecting end points ep₁ (52) and ep₂ (54) makeswith the Cartesian coordinate system of the image retrieval system.Then, the processor 36 determines the angle Θ₂ that a line connectingtop points R₁ (68) and R₂ (78) makes with the Cartesian coordinatesystem. Finally, the processor 36 subtracts Θ₁ from Θ₂ to determine theangular difference Θ, i.e., Θ=|Θ₁ -Θ₂ |. The values of Θ₁, Θ₂ and Θ arethen stored in the memory of the processor 36.

In step 258, the processor 36 compares the angular difference Θ withsome predetermined threshold. The threshold angular value is some anglethat will allow a simplified calculation to approximate a corner pointif it is not exceeded. If the processor 36 finds that the angulardifference Θ is less than the threshold value, then it proceeds to step260, where, using a "short cut" method, the processor 36 determines alength T, which is the distance between top point R₁ (68) and firstcorner point cp₁ (100). The value of T is approximated by a calculation##EQU4## Then, in step 262, the processor 36 uses the value T todetermine the X coordinate of the corner point cp₁ (100) using theequation:

    Xcp.sub.1 =X.sub.R1 +Tcos(∠R.sub.2 R.sub.1 ).

The Y coordinate of the corner point cp₁ (100) is also determined instep 262 using the equation:

    Ycp.sub.1 =Y.sub.R1 +Tsin(∠R.sub.2 R.sub.1 ).

The processor 36 then returns to the main routine 200, as shown in FIG.6A.

If, however, in step 258, the processor 36 determines that the angulardifference Θ is not less than the predetermined threshold value, thenthe processor 36 proceeds to step 264. In step 264, the processor 36determines an angle β between the line connecting root C₂ (72) and toppoint R₂ (78) and a line 116 exactly parallel to the line connectingroot C₂ (72) and root C₁ (56) as calculated in the equation:

    β=|∠C.sub.2 R.sub.2 -∠C.sub.2 C.sub.1 |.

Then, an angle α, which is the angle between the line connecting root C₂(72) and top point R₂ (78) and the line connecting top point R₂ (78) andtop point R₁ (68), is calculated by processor 36 in step 266 using theequation:

    α=180°-β-Θ.

In step 268, the processor 36 calculates a length K₂ from top point R₁(68) to a point M(118), which is where the corner point cp₁ would be ifthere were no distortion of the symbol 24. A length K₂, equals thedistance between the point R₁ and a point R'₂ as shown in FIG. 5B. Todetermine the value of K₂, the processor 36 uses the following equation:##EQU5##

In step 270, the processors 36 checks to see if the angular differencebetween the line connecting top points R₂ (78) and R₁ (68) and the lineconnecting roots C₂ (72) and C₁ (56) is greater than zero. If it is,then the processor 36 sets a value Θ₃ equal to -Θ in step 272; however,if the processor 36 determines that the angular difference is notgreater than zero, then the processor 36 sets the value Θ₃ equal to Θ bybranching to step 274 instead. Next, in step 276, a point M(118) shownin FIG. 5B, is calculated by the processor 36.

The X position of the point M(118) along the X axis on the Cartesiancoordinate system is calculated by the processor 36 using the equation:

    X.sub.M =X.sub.R1 +K.sub.2 cos(∠R.sub.2 R.sub.1 +Θ.sub.3).

The Y position of the point M(118) on the Y axis of the Cartesiancoordinate system is calculated by the processor 36 using the equation:

    Y.sub.M =X.sub.R +K.sub.2 sin (∠R.sub.2 R.sub.1 +Θ.sub.3)

The processor 36 next determines the inner angles of a triangle 120,shown in FIG. 5B, to assist in calculating the value T, discussed above.First, the processor 36 calculates a value α' using the equation:

    α'=|M.sub.ep1 -∠MR.sub.1 |

where the angle α' is the difference between the angles of the lineconnecting the point M(118) and the end point ep₁ (52) and the lineconnecting the point M(118) and the top point R₁ (68) as shown in FIG.5B. Next, the processor 36 in step 280 calculates an angle β' using theequation:

    β'=180°-α'-Θ.

After the angles α' and β' have been calculated, the value of T, whichis the line connecting top point R₁ (68) with the first corner point cp₁(100), is approximated by the processor 36 in step 282 with thefollowing equation: ##EQU6## Once the value of T has been calculated,the processor 36 proceeds to step 262, discussed above, and calculatesthe x and y coordinates of the first corner point cp₁ (100). After thefirst corner point cp₁ (100) has been located, the processor 36 returnsto main routine 200, shown in FIG. 6A.

The processor 36, after completing the first corner point subroutine250, shown in FIG. 6B, and calculating the position of the first cornerpoint cp₁ (100) proceeds to step 218 in the main routine 200, shown inFIG. 6A. In step 218, the processor 36 invokes a second corner pointsubroutine 300, shown in FIG. 6C, to locate the position of the cornerpoint cp₂, as shown in FIG. 5C.

Referring to FIG. 6C, initially, in step 302, the processor 36 recallsfrom its memory and inputs the previously calculated values of the rootsC₂ (72), and C₁ (56), as well as the top points R₁ (68) and R₂ (78), andthe end points ep₂ (54) and ep₁ (52). In step 304, the processor 36determines a length L'₁, as shown in FIG. 5C, by measuring the distancebetween the root C₁ (56) and the root C₂ (72). In step 304, theprocessor 36 also determines a length L'₂, shown in FIG. 5C, bymeasuring the distance between the root C₂ (72) and the end point ep₂(54). Furthermore, the processor 36 determines a distance L'₃, shown inFIG. 5C, by measuring the distance between the top point R₂ (78) and thetop point R₁ (68). The processor 36 then stores the lengths L'₁, L'₂ andL'₃ in its memory, and proceeds to step 306.

In step 306, the processor 36 calculates an angle Θ', which is theangular difference or distortion between a line connecting the endpoints ep₂ (54) and ep₁ (52) of the symbol 24 and a line connecting toppoints R₁ (68) and R₂ (78). In a non-distorted symbol, these linesshould be parallel, but any angular difference between the lines must becompensated for. Initially, in step 306, the processor 36 determines theangle Θ'₁ that a line connecting the end points ep₁ (52) and ep₂ (54)makes with the Cartesian coordinate system of the image retrievalsystem. Then, the processor 36 determines the angle Θ'₂ that a lineconnecting the top points R₁ (68) and R₂ (78) makes with the Cartesiancoordinate system. Finally, the processor 36 subtracts Θ'₁ from Θ'₂ todetermine the angular difference Θ', i.e., Θ'=|Θ'₁ -Θ'₂ |. The values ofΘ'₁, Θ'₂, and Θ' are then stored in the memory of the processor 36.

In step 308, the processor 36 compares the angular difference Θ' with apredetermined threshold. The threshold angular value is an angle thatwill allow a simplified calculation to approximate a corner point if itis not exceeded. If the processor 36 finds that the angular differenceΘ' is less than the threshold value, then it proceeds to step 310,where, using a "short cut" method, the processor 36 determines a lengthT', which is the distance between the top point R₂ (78) and the secondcorner point cp₂ (102). The value of T' is approximated by calculating:##EQU7## Then, in step 312, the processor 36 uses the value T' todetermine the X coordinate of the corner point cp₂ (102) using theequation:

    Xcp.sub.2 =X.sub.R2 +T'cos(∠R.sub.1 R.sub.2 ),

and the Y coordinate of the second corner point CP₂ (102) using theequation:

    Ycp.sub.2 =Y.sub.R2 +T'sin(∠R.sub.1 R.sub.2 ).

The processor 36 then returns to the main routine 200, as shown in FIG.6A.

If in step 308, the processor 36 determines that the angular differenceΘ' is not less than the predetermined threshold value, then theprocessor 36 proceeds to step 314. In step 314, the processor 36determines an angle β" between a line connecting the root C₁ (56) withthe top point R₁ (68) and a line 122 parallel to the line connecting endpoints ep₂ (74) and ep₁ (52). The value of the angle β" is calculated bythe equation:

    β"=180°-|∠C.sub.1 C.sub.2 -∠C.sub.1 R.sub.1 |.

Then, in step 314 the processor 36 calculates an angle α", which is theangle between the line connecting the point C₁ (56) and the top point R₁(68), and the line connecting the top points R₂ (78) and R₁ (68), usingthe equation:

    α"=180°-B"-Θ'.

In step 316, the processor 36 calculates a length K'₂ from the top pointR₂ (78) to a point M', which is where the corner point cp₂ would be ifthere were not distortion of the symbol 24. The processor 36 uses thefollowing equation to determine the value of K'₂, where: ##EQU8## Instep 318 the processor 36 checks to see if the angular differencebetween the line connecting top points R₂ (78) and R₁ (68) and the lineconnecting roots C₂ (72) and C₁ (56) is greater than zero. If theprocessor 36 determines that the angular difference is greater thanzero, then it sets the value Θ'₃ equal to -Θ', in step 320. However, ifthe processor 36 determines that this difference is not greater thanzero, then the processor 36 proceeds to step 322 and sets the value Θ'₃equal to Θ'.

Next, in step 324, the processor 36 calculates a position M'. Theposition of M' along the X axis on the Cartesian coordinate system iscalculated by the processor 36 using equation:

    X'.sub.M =X.sub.R2 =K'.sub.2 cos(∠R.sub.1 R.sub.2 +Θ'.sub.3).

The position of M' on the Y axis of the Cartesian coordinate system iscalculated by the processor 36 using the equation:

    Y'.sub.M =Y.sub.R2 +K'.sub.2 sin(∠R.sub.1 R.sub.2 +Θ'.sub.3).

The processor 36 next determines the inner angles of triangle 124 shownin FIG. 5C, to assist in calculating the value T', discussed above.First, the processor 36, in step 326, calculates α'" using the equation:

    α'"=|∠M'ep.sub.2 -∠M'R.sub.1 |.

Here, α'" is the difference between the angles of the line connectingthe point M'(126) and the end point ep₂ (54) and the line connecting thepoint M'(126) and the top point R₂ (78), as shown in FIG. 5C. Theprocessor 36, in step 326, calculates β'" using the equation:

    β'"=180°-α'"-Θ'.

After these angles have been calculated, the value of T', which is theline connecting the top point R₂ (78) and the corner point cp₂ (102), iscalculated by the processor 36 in step 328 with the equation: ##EQU9##Once the processor 36 calculates the value of T', it then proceeds tostep 312, discussed above and uses it to calculate the X and Ycoordinates Xcp₂ and Ycp₂ of the second corner point cp₂ (102). Afterthe second corner point has been located, the processor 36 returns tomain routine 200, shown in FIG. 6A.

The processor 36, after completing the second corner point subroutine300, shown in FIG. 6C, and calculating the position of the second cornerpoint cp₂ (102), proceeds to step 220 in the main routine 200, shown inFIG. 6A. In step 220, the processor 36 begins to locate the end pointsof the lower bounding box 70, shown in FIG. 5A. First, the processor 36locates the position of the end point ep'₁ (106) along the X axis of theCartesian coordinate system used to retrieve information from the image,using equation:

    Xep'.sub.1 =Xep.sub.3 +Xcos(∠ep.sub.4 ep.sub.3 ).

Recall, the coordinates (and thus the X and Y positions) of the endpoints ep₁ and ep₂ were input in step 201. The processor 36 also locatesthe position of the end point ep₁ (106) along the Y axis of theCartesian coordinate system using equation:

    Yep'.sub.1 =Yep.sub.3 +Xsin(∠ep.sub.4 ep.sub.3 ).

The processor 36 next proceeds to step 222, where it locates the secondlower end point ep'₂ (64), shown in FIG. 5A. First, the processor 36locates the position of the end point ep'₂ (104) along the X-axis of theCartesian coordinate system using equation:

    Xep'.sub.2 =Xep.sub.4 +Xcos(∠ep.sub.3 ep.sub.4 ).

Then, the processor 36 locates the position of the end point ep'₂ (104)along the Y axis of the Cartesian coordinate system using equation:

    Yep'.sub.2 =Yep.sub.4 +Ysin(∠ep.sub.3 ep.sub.4 ).

Once the processor 36 has located the end points of the lower boundingbox 70 of the symbol 24, it proceeds to step 224, where it determinesthe position of the corner point cp₄ (110) of the lower bounding box 70,shown in FIG. 5A, by invoking a third corner point subroutine 400, shownin FIG. 6E.

Referring to FIG. 6E, in step 402 of the subroutine 400, the processor36 recalls and inputs the position of the previously calculated pointsC₃ (80), C₄ (82), R₃ (96), R₄ (98), ep'₁ (106) and ep'₂ (104). Then, instep 404, the processor 36 determines a length L₄, as shown in FIG. 5D,by measuring the distance between the root C₄ (82) and the root C₃ (80).Further, in step 404, the processor 36 determines a length L₅ bymeasuring the distance between the end point ep'₂ (104) and the root C₄(82). The processor 36 also determines a length L₆, also shown in FIG.5D, by measuring the distance between the bottom points R₄ (98) and R₃(96). The processor 36 then stores the lengths L₄, L₅ and L₆ in itsmemory, and proceeds to step 406.

In step 406, the processor 36 calculates an angle Θ", which is theangular difference or distortion between a line parallel to the lineconnecting the bottom end points ep'₁ (106) and ep'₂ (104) and a lineconnecting the bottom points R₄ (98) and R₃ (96). In a non-distortedsymbol, these lines would be parallel. Thus, for proper decoding of thesymbol 24, any angular distortion must be compensated for. Initially, instep 406, the processor 36 determines an angle Θ₄ that a line connectingend points ep'₂ (104) and ep'₁ (106) makes with the Cartesian coordinatesystem of the image retrieval system. Then, the processor 36 determinesan angle Θ₅ that a line connecting the bottom points R₄ (98) and R₃ (96)makes with the Cartesian coordinate system. Finally, the processor 36subtracts the angle Θ₅ from the angle Θ₄, and the absolute value of thisdifference is the angular difference Θ", i.e., Θ"=|Θ₄ -Θ₅ |. The valuesof Θ₄, Θ₅ and Θ" are then stored in the memory of the processor 36. Theprocessor 36 then proceeds to step 408.

In step 408, the processor 36 compares the angular difference Θ" with apredetermined threshold. If the threshold angular value is not exceededthen the processor 36 may use a simplified calculation to approximatethe corner point under consideration. If the processor 36 finds that theangular difference Θ" is less than the threshold value, then it proceedsto step 410, where, using a "short cut" method, the processor 36determines a length T₁, which is the distance between bottom points R₄(98) and fourth corner point cp₄ (110). The value of T₁ is approximatedby calculating: ##EQU10##

The processor 36 then proceeds to step 412, where it uses the value T₁to determine the X-coordinate of the corner point cp₄ (110) using theequation:

    Xcp.sub.4 =Y.sub.R4 +T.sub.1 cos(∠R.sub.4 R.sub.3 ).

The Y coordinate of the corner point cp₄ (110) is determined using theequation:

    Ycp.sub.4 =Y.sub.R4 +T.sub.1 sin(∠R.sub.4 R.sub.3 ).

The processor 36 then returns to the main routine 200, as shown in FIG.6A.

However, if in step 408, the processor 36 determines that the angulardifference Θ" is not less than the predetermined threshold value, thenthe processor 36 proceeds to step 414. In step 414, the processor 36determines an angle β₁ which is calculated by the equation:

    β.sub.1 =180°-|∠C.sub.4 C.sub.3 -∠C.sub.4 R.sub.4 |

Then, the processor 36 determines an angle α₁, using the equation:

    β.sub.1 180°-β.sub.1 -Θ".

In step 416, the processor 36 calculates a length K"₂ from the bottompoint R₄ (98) to a point M", which is where the corner point would be ifthere were no distortion of the symbol 24. The processor 36 uses thefollowing equation to determine the value of K"₂ as follows: ##EQU11##

In step 418, the processor 36 checks to see if the angular differencebetween the line connecting the bottom points R₃ (96) and R₄ (98) andthe line connecting the points of the roots C₃ (80) and C₄ (82) isgreater than zero. If the distance is greater than zero, then theprocessor 36 sets a value Θ₆ equal to -Θ" in step 420. However, if theprocessor 36 determines that the angular difference is not greater thanzero, then the processor 36 sets the value Θ₆ equal to Θ". Next, in step424, the position M"(130), shown in FIG. 5D is calculated by theprocessor 36. The position of M" along the X axis of the Cartesiancoordinate system is calculated by the processor 36 using the equation:

    Xm"=X.sub.R4 +K".sub.2 cos(∠R.sub.4 R.sub.3 +Θ.sub.6).

The position of M" along the Y axis of the Cartesian coordinate systemis calculated using the equation:

    Ym"=Y.sub.R4 +K".sub.2 sin(∠R.sub.4 R.sub.3 +Θ.sub.6).

The processor 36 next proceeds to step 426, where it determines theinner angles of a triangle 132 shown in FIG. 5D to assist in calculatingthe value of T₁, discussed above. First, the processor 36 calculates anangle α'₁ using the equation α'₁ =|∠M"ep'₂ -∠M"R₃ |. In other words theangle α'₁ is the difference between the angles of the line connectingthe point M"(130) and the end point ep'₂ (104) and the line connectingthe point M"(130) and the bottom point R₃ (96) as shown in FIG. 5D. Theprocessor 36 in step 426 calculates β'₁ using equation:

    β'.sub.1 =180°-α'.sub.1 -Θ".

After these angles have been calculated, the processor 36, in step 428,calculates the value of T₁, which is the length of line connecting thebottom point R₄ (98) with the fourth corner point cp₄ (110), with thefollowing equation: ##EQU12## Once the value of T₁ has been calculated,the processor 36 proceeds to step 412, discussed above, and calculatesthe X and Y coordinates Xcp₄ and Ycp₄ of the fourth corner point cp₄(110). After the position of the fourth corner point cp₄ (110) has beencomputed, the processor 36 returns to the main routine 200, shown inFIG. 6A.

The processor 36, after completing the subroutine 400, shown in FIG. 6Eand calculating the position of the corner point cp₄ (110), proceeds tostep 226, shown in FIG. 6A. In step 226, the processor 36 invokes afourth corner point subroutine 350, shown in FIG. 6D, to locate thecorner point cp₃ (108). Referring to FIG. 6D, in step 352, the processor36 recalls from its memory and inputs the previously calculated valuesof roots C₄ (82), and C₃ (80), as well as bottom points R₄ (98) and R₃(96), and end points ep'₂ (104) and ep'₁ (106). In step 354, theprocessor 36 determines a length L'₄, as shown in FIG. 5E, by measuringthe distance between the root C₄ (82) and the root C₃ (80). In step 354,the processor 36 also determines a distance L'₅, shown in FIG. 5E, bymeasuring the distance between the root C₃ (80) and the end point ep'₁(106). The processor 36 also determines a distance L'₆, shown in FIG.5E, by measuring the distance between the bottom points R₃ (96) and R₄(98). The processor 36 then stores these lengths in its memory, andproceeds to step 356.

In step 356, the processor 36 calculates an angle Θ'", which is theangular difference or distortion between a line connecting the endpoints of the symbol 24, and a line connecting the bottom points R₃ (96)and R₄ (98). Initially, in step 356, the processor 36 determines theangle Θ'₄ that a line connecting the end points ep'₂ (104) and ep'₁(106) makes with the Cartesian coordinate system of the image retrievalsystem. Then, the processor 36 determines an angle Θ'₅ that a lineconnecting the bottom points R₄ (98) and R₃ (96) makes with theCartesian coordinate system. Finally, the processor 36 subtracts theangle Θ'₄ from the angle Θ'₅ to determine an angular difference angleΘ'", i.e., Θ'"=|Θ'₄ -Θ'₁ |. The values of Θ'₄, Θ'₅, and Θ'" are thenstored in the memory of the processor 36, and it proceeds to step 358.

In step 358, the processor 36 compares the angular difference angle Θ'"with the predetermined threshold. Recall, the threshold angular value issome angle that will allow a simplified calculation to approximate acorner point if it is not exceeded. If the processor 36 finds that theangular difference Θ'" is less than the threshold value, then itproceeds to step 360, where using a "short cut" method, the processor 36determines a length T₂, which is the distance between the bottom pointR₃ (96) and the third corner point cp₃ (108). The value of T₂ isapproximated by the calculation: ##EQU13## Then, in step 362, theprocessor 36 uses the value T₂ to determine the X coordinate of thecorner point cp₃ (108) using the equation:

    Xcp.sub.3 =X.sub.R3 +Tcos(∠R.sub.3 R.sub.4 ).

Also, in step 362 the processor determines the Y coordinate of the thirdcorner point cp₃ (108) using the equation:

    Ycp.sub.3 +Y.sub.R3 +T.sub.2 sin(∠R.sub.3 R.sub.4 ).

The processor 36 then returns to the main routine 200, as shown in FIG.6A. If, however, in step 358, the processor 36 determines that theangular difference Θ'" is not less than the predetermined thresholdvalue, then the processor 36 proceeds to step 364.

In step 364, the processor 36 determines an angle β₂ between a lineconnecting the root C₃ (80) and the bottom point R₃ (96) and a line 136parallel to the line connecting the roots C₃ (80) and C₄ (82). The valueof the angle is calculated by the processor 36 using the equation:

    β.sub.2 =|∠C.sub.3 R.sub.3 -∠C.sub.3 C.sub.4 |.

Then, in step 366, the processor 36 calculates the angle α₂, which isthe angle between the line connecting the root C₄ (82) and the bottompoint R₄ (98) and the line connecting the bottom points R₃ (96) and R₄(98), using the equation:

    α.sub.2 =180°-β.sub.2 -Θ'".

In step 368, the processor 36 calculates a length K'"₂ from the bottompoint R₃ (96) to a point M'"(137), which is where the corner point cp₃(108) would be if there were no distortion of the symbol 24. Theprocessor 36 uses the following equation to determine the value of K'"₂,where: ##EQU14## In step 370, the processor 36 checks to see if theangular difference between the line connecting bottom points R₃ (96) andR₄ (98) and the line connecting roots C₃ (80) and C₄ (82) is greaterthan zero. If the processor 36 determines that the angular difference isgreater than zero, then it sets value Θ₇ equal to -Θ'" in step 372.However, if the processor 36 determines that this difference is notgreater than zero, then the processor 36 proceeds to step 374 and setsthe value Θ₇ equal to Θ'". Next, in step 376, the processor 36calculates the position M'"(137). The position of M'"(137) along theX-axis of the Cartesian coordinate system is calculated by the processor36 using the equation:

    Xm'"=X.sub.R3 +K'".sub.2 cos(∠R.sub.3 R.sub.4 +Θ.sub.7).

The position of M'"(137) on the Y-axis of the Cartesian coordinatesystem is calculated by the processor 36 using the equation:

    Ym'"=y.sub.R3 +K'".sub.2 sin(∠R.sub.3 R.sub.4 +Θ.sub.7).

The processor 36 next determines the inner angles of a triangle 138,shown in FIG. 5E, to assist in calculating the value T₂, discussedabove. First, the processor 36, in step 378 calculates α'₂ using theequation:

    α'.sub.2 =|∠M'"ep'.sub.2 -∠M''R.sub.4 |

Next, the processor 36, in step 380, calculates β'₂ using the equation:

    β'.sub.2 =180°-α'.sub.2 -Θ'".

After these angles have been calculated, the value of T₂, which asstated above, is the line connecting the bottom point R₃ (98) and thecorner point cp₃ (108), is calculated by the processor 36 in step 382with equation: ##EQU15## Once the processor 36 calculates the value ofT₂, it then proceeds to step 362, discussed above, and uses it tocalculate the X and Y coordinates Xcp₃ and Ycp₃ of the corner point cp₃(108).

After the final corner point has been found, the processor 36 returns tomain routine 200, stores the positions or values of the points ep₁ (52),cp₁ (100), cp₂ (102), and ep₂ (74), which define the upper bounding box60 and values of the points ep'₁, cp₃, cp₄ and ep'₂, which define thelower bounding box 70. All recoverable information in the data cells ofthe symbol 24 lie within these two bounding boxes, and the processor 36realigns and compensates its manner of information retrieval via theimage using the Cartesian coordinate system in conjunction with acompensating algorithm well known in the art. Thereafter, the processor36 can decode the retrieved data from the data cells in the symbol 24.Once all the above-mentioned bounding box data have been retrieved,stored, and decoded, the main routine ends, until a new image of asymbology is stored, or the processor independently requests arecalculation of the dimensions of the bounding boxes.

Some symbols have only one vertical reference pattern 28 for a givenbounding box, such as versions A and B in the Code One symbology. For asymbol 500 only having one vertical reference pattern 528 per boundingbox, as shown in FIG. 7A, an alternative embodiment is necessary todetermine upper and lower bounding boxes 502, and 504, respectively. Inthe alternative embodiment, the processor 36 determines bounding boxesparticularly for version A and version B Code One symbologies, whichhave only one vertical reference pattern 28. This is accomplished usingsoftware that is stored as a series of program instructions in thememory of the processor 36. Flowcharts from which a source code can bewritten by one skilled in the art are illustrated in FIGS. 8A and 8B.The alternative embodiment is similar to the previously describedembodiment. Therefore, only the significant differences between thepreviously described embodiment and the alternative embodiment will bedescribed herein.

Referring to FIG. 8A, a main routine 650, which is executed by processor36, begins in step 652 by inputting to the processor 36 an X-dimensionof the symbol 500. Also input are the version of the symbol 500, endpoints ep₁ (506) and ep₂ (508) of a top bar 510 and end points ep₃ (512)and ep₄ (514) of a bottom bar 516, all of which are shown in FIG. 7A andwhich can be independently input by an operator or determined by theprocessor 36 using an edge finding method discussed above. The processorthen proceeds to step 654.

In step 654, the processor 36 follows a top of the top long bar 510until it determines the location of a root C₂ (518). The processor 36determines the location of the root C₂ (518) by invoking the cornerfinding subroutine 450, shown in FIG. 6F, as described in the firstembodiment. Once the root C₂ (518) has been located, the processor 36returns to the main routine 650 and proceeds to step 656.

In step 656, the processor 36 follows a direction, along the uppervertical reference bar 528 from C₂ (518) to an inner corner point r₂(520) by again invoking the corner finding subroutine 450, shown in FIG.6F. Once the processor 36 using subroutine 450 has determined thelocation of the inner corner point r₂ (520), it then proceeds to step658. In step 658, the processor 36 determines the position of a toppoint R₂ (522) by invoking the bar crossing subroutine 500, as shown inFIG. 6G, which operates as described in the first embodiment. Once theprocessor 36 has determined the position of the point R₂ (522) itreturns to the main routine 650, shown in FIG. 8A, and proceeds to step660.

In step 660, the processor 36 determines the location of a root C₃ (524)by invoking the corner finding subroutine 450, shown in FIG. 6F, thatmoves along the bottom bar 516 from the previously detected end pointep₃ (512) until it detects the location of a root C₃ (524). Thesubroutine 450 carries out the same operations as described in the firstembodiment. Once the root C₃ (524) has been located, the processor 36returns to the main routine 650 and proceeds to step 662.

In step 662, the processor 36 follows a direction along the lowervertical reference bar 28 from the root C₃ (524) to an inner corner r₃(526) by again invoking the corner finding subroutine 450, shown in FIG.6F. Once the processor 36, using subroutine 450, has determined thelocation of the inner corner point r₃ (526), it then returns to the mainroutine 650, shown in FIG. 8A, and proceeds to step 664. In step 664,the processor 36 determines the position of a bottom point R₃ (530) byinvoking the bar crossing subroutine 500, as shown in FIG. 6G. Once theprocessor 36 has successfully determined the bottom point R₃ (530) itreturns to the main routine 650, shown in FIG. 8A, and stores the valuesof the top point R₂ (522), the end points ep₁, ep₂, ep₃ and ep₄, and thebottom point R₃ (530) in its memory. The processor 36 then proceeds toinvoke a subroutine 666, shown in FIG. 8B, which computes the positionsof corner points for the top bounding box 502 and the lower bounding box504.

Referring to FIG. 8B, in step 668 of the subroutine 666, the processor36 recalls and inputs the previously determined positions or values ofthe end points ep₁ (506) and ep₂ (508), ep₃ (512), and ep₄ (514) as wellas the roots C₂ (518) and C₃ (524), the top point R₂ (522), and thebottom point R₃ (530). The processor 36 also inputs the length of Xdimensions measured longitudinally outward from the lower bar end pointsep₃ (512) and ep₄ (514) to the edge of data cells ep'₁ (546) and ep'₂(540), respectively, of the symbol 500 (FIG. 7B). Next, in step 670, theprocessor 36 proceeds to step 670 of the subroutine 666 and calculatesvarious lengths and distances of lines connecting the various inputtedvalues. First the processor 36 determines a length L'(519) of a lineconnecting the root C₂ (518) and the top point R₂ (522), as shown inFIG. 7B. Then, the processor 36 determines a length L"(521) of a lineconnecting the root C₃ (524) and the bottom point R₃ (526). Theprocessor 36 also measures a distance d₁, shown in FIG. 7B, between theend point ep₂ (508) and the root C₂ (518). Finally, in step 670, theprocessor 36 determines a distance d₂, shown in FIG. 7B, between theroot C₃ (524) and the end point ep₃ (512). After determining values forL', L", d₁ and d₂, the processor 36 stores these values in its memory,and proceeds to calculate the corner points of the upper bounding box502, and the lower bounding box 504 of the symbol 500.

Initially, the processor 36 calculates the position of a first cornerpoint cp₁ (536) in step 672 of subroutine 666. To determine the positionof the point cp₁ (536) along the X-axis of the Cartesian coordinatesystem used to retrieve data from an image, the processor 36 calculatesXcp₁ using the following equation:

    Xcp.sub.1 =Xep.sub.1 +L'cos(∠R.sub.3 C.sub.3 ).

Then, to determine the position of cp₁ (536) along the Y-axis of theCartesian coordinate system, the processor 36 calculates Ycp₁ with theequation:

    Ycp.sub.1 =Yep.sub.1 +L'sin(∠R.sub.3 C.sub.3 ).

Once the processor 36 has calculated and stored the position of thefirst corner point cp₁ (536), it then proceeds to step 674.

In step 674 of subroutine 666, the processor 36 calculates the positionof a second corner point cp₂ (538). To determine the position of cp₂(538) along the X-axis of the Cartesian coordinate system, the processor36 calculates Xcp₂ with the equation:

    Xcp.sub.2 =X.sub.R2 +d.sub.1 cos(∠ep.sub.1 ep.sub.2 ).

Then, to determine the position of the point cp₂ (538) along the Y-axisof the Cartesian coordinate system, the processor 36 calculates Ycp₂with the equation:

    Ycp.sub.2 =Y.sub.R2 +d.sub.1 sin(∠ep.sub.1 ep.sub.2 ).

Once the processor 36 has calculated and stored the position of thesecond corner point cp₂ (538), the processor 36 proceeds to step 676,and determines the position of an end point ep'₂ (540), which defines acorner of the lower bounding box 504.

To determine the position of the point ep'₂ (540) along the X-axis ofthe Cartesian coordinate system, the processor 36 calculates Xep'₂ withthe equation:

    Xep'.sub.2 =Xep.sub.2 +X.sub.dim ·cos(∠ep.sub.3 ep.sub.4 ),

where X_(dim) is the X-dimension determined above for the symbol 500.Then, to determine the position of the point ep₂ along the Y-axis of theCartesian coordinate system, the processor 36 calculates Yep'₂ with theequation:

    Yep'.sub.2 =Yep.sub.2 +X.sub.dim ·sin(∠ep.sub.3 ep.sub.4 ).

Next, in step 678, the processor 36 determines the position of an endpoint ep'₁ (546), which defines a corner of the lower bounding box 504.To determine the position of the point ep'₁ (546) along the X-axis ofthe Cartesian coordinate system, the processor 36 calculates Xep'₁ withthe equation:

    Xep'.sub.1 -Xep.sub.3 +X.sub.dim ·cos(∠ep.sub.4 ep.sub.3 ).

Then, to determine the position of ep'₁ (546) along the Y-axis of theCartesian coordinate system, the processor 36 calculates Yep'₁ with theequation:

    Yep'.sub.1 =Yep.sub.3 +X.sub.dim ·sin(∠ep.sub.4 ep.sub.3 ).

Following the determination and storage of the position of the endpoints, the processor 36 proceeds to step 680 to calculate the positionof a fourth corner point cp₄ (540).

The processor 36 determines the position of the fourth corner point cp₄(540) along the X-axis of the Cartesian coordinate system, i.e., Xcp₄,with the equation:

    Xcp.sub.4 =Xep'.sub.2 +L"cos(∠R.sub.2 C.sub.2 ).

Then, the processor 36 determines the position of the point cp₄ (540)along the Y-axis of the Cartesian coordinate system, i.e., Ycp₄, withthe equation:

    Ycp.sub.4 =Yep'.sub.2 +L"sin(∠R.sub.2 C.sub.2 ).

Finally, the processor 36 proceeds to step 682 where it calculates theposition of a third corner point cp₃ (544).

The processor 36 determines the position of the third corner point cp₃(544) along the X-axis of the Cartesian coordinate system with thefollowing equation:

    Ycp.sub.3 =X.sub.R3 +(d.sub.2 +X.sub.dim)·cos (∠ep.sub.4 ep.sub.3 ).

Then, the processor 36 determines the position of the point cp₃ (544)along the Y-axis of the Cartesian coordinate system using the equation:

    Ycp.sub.3 =X.sub.R3 +(d.sub.2 +X.sub.dim)·sin(∠ep.sub.4 ep.sub.3 ).

After the final corner point cp₃ (544) has been found, the processor 36returns to the main routine 650, shown in FIG. 8A, stores positions orvalues of the points cp₁ (536), cp₂ (538), ep₂ (508), and ep₁ (506)which define the upper bounding box 502, as well as values of the pointsep'₂ (540), ep'₁ (546), cp₄ (540), and cp₃ (544), which define the lowerbounding box 504. All recoverable information in data cells of thesymbol 500 lie within these two bounding boxes, and the processor 36realigns the Cartesian coordinate system to compensate for anydistortion in the image during information retrieval using theboundaries defining the bounding boxes. Once all the information hasbeen retrieved, stored and decoded by the processor 36, it sets a flagindicating that the corrective procedure has been performed andinformation retrieval by the reader 20 may proceed.

Thus, the present invention allows the accurate determination ofbounding boxes by minimizing any inherent error in the calculation ofits boundaries. This error minimization is accomplished by utilizing thevertical reference bars when calculating the corner points of thebounding boxes.

Except as otherwise disclosed herein, the various components shown inoutline or block form in FIG. 4 are individually well known and theinternal construction of their operation is not critical either to themaking or the using of this invention or to a description of the bestmode of the invention.

While the detailed description above has been expressed in terms ofspecific examples, those skilled in the art will appreciate that manyother configurations could be used to accomplish the purpose of thedisclosed inventive apparatus. Accordingly, it would be appreciated thatthe various equivalent modifications of the above-described embodimentsmay be made without departing from the spirit and scope of theinvention. Therefore, the invention is to be limited only by thefollowing claims.

I claim:
 1. A method for computing a location of data regions in astored image of a symbol, the symbol including a recognition patternhaving an outermost bar and at least one vertical reference patternextending perpendicularly from the recognition pattern, said methodcomprising the steps of:locating a position of a first end point and asecond end point of the outermost bar of the recognition pattern;locating a position of an outermost point of each of the at least onevertical reference pattern; determining a position of a first cornerpoint and a second corner point for the symbol by extending at least oneline from the outermost point a predetermined distance in apredetermined direction, wherein the first and second corner pointsdiffer from the first and second end points; and defining a periphery ofthe symbol using the positions of the first end point, the second endpoint, the first corner point, and the second corner point.
 2. Themethod for computing a location according to claim 1 wherein said stepof locating the position of the outermost point includes the stepsof:moving along the outermost bar from at least one of the first endpoint toward the second end point until a root point at an adjacent baseof the vertical reference pattern is reached; traveling along each ofthe at least one vertical reference pattern until an inner corner of afoot of the at least one vertical reference pattern is reached; andcrossing the foot of the at least one vertical reference pattern todetermine the location of the outermost point.
 3. The method forcomputing a location according to claim 2 wherein said step of movingalong the outermost bar includes the steps of:starting at one of thefirst end point and the second end point to advance a predesignateddistance along an edge of the outermost bar; proceeding to incrementallyadvance along the edge of the outermost bar from the predesignateddistance until at least one of an edge is no longer detected ahead ofthe advance and a direction of the edge changes by more thanapproximately 90°; and designating a termination of the advance alongthe outermost bar as the root point of the at least one verticalreference pattern.
 4. The method for computing a location according toclaim 3 wherein the predesignated distance is dependent on anX-dimension and a version of the symbol.
 5. The method for computing alocation according to claim 3 wherein said step of traveling along eachof the at least one vertical reference pattern includes the stepsof:starting at one of the root point of the at least one verticalreference pattern and advancing a second predesignated distance along anedge of the at least one vertical reference pattern; proceeding toincrementally advance along the at least one vertical reference patternuntil at least one of an edge is no longer detected ahead of the advanceand a direction of the edge alters by more than approximately 90°; anddesignating a termination of the advance along the at least one verticalreference pattern as the inner corner of the foot of the at least onevertical reference pattern.
 6. The method for computing a locationaccording to claim 5 wherein said step of crossing the foot of the atleast one vertical reference pattern includes the steps of:taking areading of an intensity at a present position; comparing the intensityagainst a threshold intensity; incrementally advancing the positionalong a crossing direction until an intensity at a current point exceedsthe threshold intensity; and designating the current point where thethreshold intensity was exceeded as the outermost point.
 7. The methodfor computing a location according to claim 5 wherein the crossingdirection is perpendicular to an entry boundary on the foot.
 8. Themethod for computing a location according to claim 1, further comprisingthe step of estimating an upper bounding box and a lower bounding box,wherein at least a portion of the upper and lower bounding boxes extendalong the periphery of the symbol.
 9. The method for computing alocation according to claim 8 wherein the first and second end pointscorrespond to the upper bounding box and wherein positions of first andsecond end points of the bottom bounding box are determined byextrapolating the positions of the first end point and the second endpoint of the top bounding box a predetermined distance, respectively.10. The method for computing a location according to claim 9 wherein thepredetermined distance is based on an X-dimension of the symbology. 11.The method for computing a location according to claim 1 wherein saidstep of determining a position of first and second corner pointsincludes the steps of:determining positions of first and second rootpoints respectively located at intersections between first and secondvertical reference patterns and the outermost bar of the recognitionpattern; and calculating the predetermined distance based on a ratiodefined by a distance between the first and second outermost points ofthe first and second vertical reference patterns multiplied by adistance between one of the first and second root points and one of thefirst and second end points of the outermost bar divided by a distancebetween the first and second root points.
 12. The method for computing alocation according to claim 11, further comprising the step of:comparingan angle of a line connecting the first end point and the second endpoint with a line connecting first and second outermost points of firstand second vertical reference bars, respectively, to determine acorrection value; and wherein the step of calculating the predetermineddistance includes multiplying the ratio by the correction value.
 13. Amethod for computing an upper and lower bounding box of a Code Onesymbol having a recognition pattern, including a top bar adjacent theupper bounding box and a lower bar adjacent the lower bounding box, andfour vertical reference bars, each having a foot portion end away fromthe recognition pattern and a root portion, the four vertical referencebars including first and second vertical reference bars where the rootportion is contiguous with the top bar, and third and fourth verticalreference bars where the root portion is contiguous with the lower bar,said method comprising the steps of:locating a position of a first endpoint and a second end point of the top bar; determining the location ofthe root portion of the first and second vertical reference bars fromthe first and second end points, respectively; locating an inner cornerof the foot of the first and second vertical reference bars from theroot portion of the first and second vertical reference bars,respectively; crossing the foot of the first and second verticalreference bars to reach a top point of the first and second verticalreference bars; extrapolating from the top point of the first and secondvertical reference bars in a first predetermined direction for a firstpredetermined distance to reach first and second corner points;projecting from the first and second end points in a secondpredetermined direction along the recognition pattern to third andfourth end points in line with the lower bar; determining the locationof the root portion of the third and fourth vertical reference bars fromthe third and fourth end points, respectively; locating an inner cornerof the foot of the third and fourth vertical reference bars from theroot portion of the third and fourth vertical reference bars,respectively; crossing the foot of the third and fourth verticalreference bars to reach a bottom point of the third and fourth verticalreference bars; extrapolating from the bottom point of the third andfourth vertical reference bars in a third predetermined direction for athird predetermined distance to reach third and fourth corner points;defining the upper bounding box using the first and second end points aswell as the first and second corner points; and defining the lowerbounding box using the third and fourth end points as well as the thirdand fourth corner points.
 14. The method for computing according toclaim 13 wherein the step of determining the location of the rootportion of the first and second vertical reference bars includes thesteps of:moving along the top bar in incremental steps from the firstand second end points, respectively; continuing to advance along the topbar until at least one of an edge is no longer detected ahead of theadvance and a direction of the edge changes by approximately 90°; anddesignating a termination of the advance along the top bar as the rootportion of the first and second vertical reference bars.
 15. The methodfor computing according to claim 13 wherein the step of locating aninner corner of the foot of the first and second vertical referencebars, comprises the steps of:starting at the root portion of the firstand second vertical reference patterns; proceeding to incrementallyadvance along the at least one vertical reference pattern until at leastone of an edge is no longer detected ahead of the advance and adirection of the edge alters by approximately more than 90°; anddesignating a termination of the advance along the first and secondvertical reference patterns as the inner corner of the foot of the firstand second vertical reference patterns.
 16. The method for computingaccording to claim 13 wherein the step of crossing the foot of the firstand second vertical reference patterns comprises the steps of: taking areading of an intensity at a preset position;comparing the intensityagainst a threshold intensity; incrementally advancing the positionalong a crossing direction until the intensity at that point exceeds thethreshold intensity; and designating the position where the thresholdintensity was exceeded as the top point of the first and second verticalreference bars.
 17. An apparatus for decoding a machine-readable symbolrepresenting encoded information, the symbol having a recognitionpattern with an outermost bar and at least one vertical referencepattern extending approximately perpendicular from the recognitionpattern, the apparatus comprising:a sensor that receives light reflectedfrom the symbol and produces an output signal therefrom; a receiver thatreceives the output signal and produces a data signal indicative of theencoded information, the recognition pattern and the at least onevertical reference pattern; and a processor for decoding the encodedinformation encoded in the symbol, the processor being programmed to (a)locate a position of a first end point and a second end point of theoutermost bar of the recognition pattern, (b) locate a position of anoutermost point of each of the at least one vertical reference pattern,(c) determine a position of a first corner point and a second cornerpoint for the symbol by extending at least one line from the outermostpoint a predetermined distance in a predetermined direction, wherein thefirst and second corner points differ from the first and second endpoints, (d) define a periphery of the symbol using the positions of thefirst end point, the second end point, the first corner point and thesecond corner point, and (e) decode the encoded information within theperiphery of the symbol.
 18. The apparatus of claim 17 wherein theprocessor is programmed to locate the position of the outermost point by(i) moving along the outermost bar from at least one of the first endpoint toward the second end point until a root point at an adjacent baseof the vertical reference pattern is located, (ii) traveling along eachof the at least one vertical reference pattern until an inner corner ofa foot of the at least one vertical reference pattern is located, and(iii) crossing the foot of the at least one vertical reference patternto determine the location of the outermost point.
 19. The apparatus ofclaim 18 wherein the processor moves along the outermost bar by (i)starting at one of the first end point and the second end point toadvance a predesignated distance along an edge of the outermost bar,(ii) proceeding to incrementally advance along the edge of the outermostbar from the predesignated distance until at least one of an edge is nolonger detected ahead of the advance and a direction of the edge changesby approximately more than 90°, and (iii) designating a termination ofthe advance along the outermost bar as the root point of the at leastone vertical reference pattern.
 20. The apparatus of claim 18 whereinthe processor travels along the vertical reference pattern by (i)starting at one of the root point of the at least one vertical referencepattern and advancing a second predesignated distance along an edge ofthe at least one vertical reference pattern, (ii) proceeding toincrementally advance along the at least one vertical reference patternuntil at least one of an edge is no longer detected ahead of the advanceand a direction of the edge alters by approximately more than 90°, and(iii) designating a termination of the advance along the at least onevertical reference pattern as the inner corner of the foot of the atleast one vertical reference pattern.
 21. The apparatus of claim 20wherein the processor crosses the foot by (i) taking a reading of alight intensity at a present position, (ii) comparing the lightintensity against a threshold light intensity, (iii) incrementallyadvancing the position along a crossing direction until an intensity ata current point exceeds the threshold light intensity, and (iv)designating the current point where the threshold intensity was exceededas the outermost point.
 22. The apparatus of claim 17 wherein theprocessor is programmed to determine the position of the first andsecond corner points by (i) comparing an angle of a line connecting thefirst end point and the second end point with a line connecting theoutermost point of each of the at least one vertical reference patternto determine the predetermined direction, and (ii) calculate thepredetermined distance based on the distance between the first andsecond end point and the at least one vertical reference pattern, aswell as the distance between the outermost point of each of the at leastone vertical reference pattern.
 23. A method for computing a location ofdata regions in a stored image of a symbol, wherein the symbol includesa recognition pattern having an outermost bar and at least one verticalreference pattern extending approximately perpendicularly from therecognition pattern, the method comprising the steps of:identifying aposition of first and second end points of the outermost bar of therecognition pattern; locating a position of an outermost point of the atleast one vertical reference pattern, wherein the data regions in thestored image of the symbol extend on opposite sides of the at least onevertical reference pattern; identifying a position of first and secondcorner points for the stored image of the symbol, wherein the first andsecond corner points differ from the first and second end points; andidentifying a periphery of the data regions in the stored image of thesymbol based on the positions of the first and second end points andfirst and second corner points.
 24. A method for computing a location ofdata regions in a stored image of an image of a symbol, wherein thesymbol includes a recognition pattern having an outermost bar and atleast one vertical reference pattern extending approximatelyperpendicularly from the recognition pattern, the method comprising thesteps of:identifying a position of first and second end points of theoutermost bar of the recognition pattern; locating a position of anoutermost point of the at least one vertical reference pattern, whereinan image of the recognition pattern in the stored image fails toaccurately define data regions in the stored image of the symbol;identifying a position of first and second corner points for the storedimage of the symbol, wherein the first and second corner points differfrom the first and second end points; and accurately defining aperiphery of the data regions in the stored image of the symbol based onthe positions of the first and second end points and first and secondcorner points.